
#include <vector>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <string>

using namespace std;

int main(int argc, char const *argv[]) {
    
    int ia[6] = {27, 210, 12, 47, 109, 83};

    vector<int, allocator<int>> vi(ia, ia + 6);

    cout << count_if(vi.begin(), vi.end(), not1(bind2nd(less<int>(), 40))) << endl;

    // .end() 是未知的东西
    cout << *vi.end() << endl;
    cout << "----------------------------------------------------------------" << endl;


    // for (decl : coll) { statement }
    // for (声明 : 聚合体[容器或者指针])
    for (int i : {1, 2, 3, 4, 5, 6, 7, 8, 9}) {
        cout << i << "\t";
    }
    cout << endl;

    for (auto elem : vi) {
        cout << elem << "\t";
    }
    cout << endl;

    for (auto& elem : vi) {
        elem *= 3;
    }

    for (auto elem : vi) {
        cout << elem << "\t";
    }
    cout << endl;

    cout << "----------------------------------------------------------------" << endl;


    pair<int, string> a;


    return 0;
}
  